package uk.ac.aber.Blockmation.Actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import uk.ac.aber.Blockmation.MainFrame;


/**
 * 
 * @author Aron
 */

public class ActionClearFrame extends AbstractAction {
	
	private MainFrame mainFrame;

    public ActionClearFrame (MainFrame mainFrame) {
        super("Clear Frame"); 
        this.mainFrame = mainFrame;
        
        // the below from settings class file or?!
        //putValue(SHORT_DESCRIPTION, tooltip);  // Will appear as tooltip text.
        //putValue(MNEMONIC_KEY, new Integer(mnemonic));
        
    }
        
    public void actionPerformed(ActionEvent e) {
       mainFrame.getPad().clear();
       mainFrame.getMovieModel().setFrame(mainFrame.getCurrentFrameIndex(), 
				mainFrame.getPad().getImage() );
    }


}
